<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Introduction to JEE tutorials</title>
<link rel="stylesheet" href="/cfg/format.css" type="text/css">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="keywords" content="jee tutorial, java, web applications, Introduction">
<meta name="description" content="This is an introductory part of the Java EE 5 tutorials.">
<meta name="language" content="en">
<meta name="author" content="Jan Bodnar">
<meta name="distribution" content="global">

<script type="text/javascript" src="/lib/jquery.js"></script>
<script type="text/javascript" src="/lib/common.js"></script>

</head>

<body>

<div class="container">

<div id="wide_ad" class="ltow">
<script type="text/javascript"><!--
google_ad_client = "pub-9706709751191532";
/* 160x600, August 2011 */
google_ad_slot = "2484182563";
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>


<div class="content">


<a href="/" title="Home">Home</a>&nbsp;&nbsp;
<a href=".." title="Contents">Contents</a>


<h1>Introduction</h1>

<p>
In this part of the JEE tutorials, we will talk about the goals of the 
tutorials and we provide some
definitions. 
</p>

<div class="center"> 
<script type="text/javascript"><!--
google_ad_client = "pub-9706709751191532";
/* horizontal */
google_ad_slot = "1734478269";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script> 
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> 
</script> 
</div> 


<h2>About JEE tutorials</h2>

<p>
The JEE tutorials are a set of tutorials covering the Java Platform, Enterprise Edition. (JEE)
The purpose of the tutorials is to introduce novice programmers to the JEE platform. 
</p>



<h2>JEE programmer</h2>

<p>
Every good JEE programmer must acquire an enourmous amount of knowledge. 
Everybody tells you what to study, but no one tells you how to study. 
One can easily be lost in all this tools, technologies, recommendations, 
libraries. There are many tools that help advance programmers develop 
their applications. But on the other hand, they bring additional complexity 
to development. Tools like XDoclet or Hibernate help advanced JEE programmers 
focus on the application logic, but necessarily make the learning curve 
steeper for a novice programmer. Have a look at the various Apache projects 
at <a href="http://www.apache.org">www.apache.org</a>. Ant, Cocoon, iBATIS, Struts, Maven, Tapestry,
Xalan, Velocity. Just to name a few. 
</p>

<p>
You cannot become a general, unless you were a private. You must go to 
the top, from the very bottom. There is no shortcut available. The best way 
for a novice programmer is a step by step approach. Pick one tool, library 
at a time and play with it. Realizing all this, I have made the tutorials 
to cope with all this complexity. We will begin with the very basic 
things like installing necessary tools, trying very simple JSP files or servlets. 
</p>

<h2>Java Platforms</h2>

<p>
The world of Java is divided into the following three platforms.
</p>

<ul>
<li>Java Platform, Standard Edition, Java SE</li>
<li>Java Platform, Micro Edition, Java ME</li>
<li>Java Platform, Enterprise Edition, Java EE</li>
</ul>


<p>
The <b>Java SE</b> is the core Java technology platform. It is used to 
create Java desktop and server applications.
The <b>Java ME</b> is aimed at creating applications for portable devices 
like cell phones or PDAs. 
The <b>Java EE</b> is a platform for creating large enterprise applications. 
It adds libriaries necessary to create stable, secure, multi-tier, distributed applications. 
</p>



<h2>Java EE</h2>

<p>
Java Platform, Enterprise Edition is a set of libraries, tools, specifications, 
best practices for developing, deploying and managing server side enterprise level applications. 
</p>

<p>
Each application is executed on the <b>application server</b>. Some of the well known 
application servers are JBoss, OCJ, Resin, WebLogic. In this tutorials, we will use Resin. 
To create and manage source code, developers use <b>Integrated Development Environments</b>, 
(IDEs). The most popular IDEs are NetBeans, Eclipse, JDeveloper and IntelliJ IDEA. 
</p>

<p>
The key technologies of the Java EE are:
</p>

<ul>
<li>Web Services Technologies</li>
<li>Web Application Technologies</li>
<li>Enterprise Application Technologies</li>
<li>Management and Security Technologies</li>
</ul>

<p>
To install all this techologies, we can go to <a href="http://java.sun.com/javaee/downloads/index.jsp">sun download</a>
site, or we can download the NetBeans JEE pack. These techologies are included in this pack.
</p>

<p>
The Java Platform, Enterprise Edition is not limited to these technologies. 
The platform has a wide variety of additional
tools and libraries. The numerous Apache projects are good examples.
</p>

<p>
The Java EE also consists of a set of best practicies, coding styles and software patterns.
</p>




<h2>Web Application</h2>

<p>
An enterprise application consists of web modules. These are packaged in war files.  
A war (short for Web Archive) file is
jar file used to distribute a collection of JavaServer Pages, servlets, Java classes, 
XML files, tag libraries and static Web pages. They create a web application. Smaller 
web applications can be packaged in a war file.
</p>

<p>
All servlets, classes, static files, and other resources belonging to a Web Application 
are organized under a directory hierarchy.
</p>

<br>
<img src="/img/java/jee/webapp.png" alt="Web Application">
<div class="figure">Figure: Web Application</div>
<br>

<p>
The root directory of this directory structure is called the <b>document root</b>. 
Let's have a web application called email. For the Resin AS, the path to the document root would be:
</p>

<pre class="code">
RESIN_INSTALL_DIR/webapps/email 
</pre>

<p>
We place our files and resources under the document root directory. All files are visible except for a special 
directory <b>WEB-INF</b>. All files under the WEB-INF directory are privite and are not visible to the client.
The WEB-INF directory is optional, but it is always created unless we create some very simple examples.
</p>

<p>
The WEB-INF directory contains two special files and two directories. The <b>web.xml</b> file is a web application
deployment descriptor. It is used to configure the web application. The web.xml file is a Java EE deployment descriptor.
It is defined by a specification. There is another type of descriptor called runtime deployment descriptor. It 
is used to configure Java EE implementation specific  parameters. In the case of Resin Application Server, the runtime
deployment descriptor is called <b>resin-web.xml</b>. In case of Glassfish AS it is called <b>sun-web.xml</b>.
</p>

<p>
The two special directories are named <b>classes</b> and <b>lib</b>. We place all compiled servlets and utility classes
under the classes directory. The lib directory contains additional libraries in form of jar files. These can 
be e.g. third party libraries like database drivers or xml parsers. 
</p>

<p>
It is conventional to put tag files into the <b>tag</b> directory.
</p>


<h2>Tools</h2>

<p>
The tools, that we use in the JEE tutorials are:
</p>

<ul>

<li>JDK 1.6</li>
<li>NetBeans 6</li>
<li>Resin application server</li>
<li>MySQL database</li>

</ul>


<p>
This was an introduction to JEE. 
</p>

<div class="center"> 
<script type="text/javascript"><!--
google_ad_client = "pub-9706709751191532";
/* horizontal */
google_ad_slot = "1734478269";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script> 
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> 
</script> 
</div> 
<br> 

<div class="botNav, center">
<span class="botNavItem"><a href="/">Home</a></span> ‡ <span class="botNavItem"><a href="..">Contents</a></span> ‡ 
<span class="botNavItem"><a href="#">Top of Page</a></span>
</div>


<div class="footer">
<div class="signature">
<a href="/">ZetCode</a> last modified February 2, 2008  <span class="copyright">&copy; 2007 - 2013 Jan Bodnar</span>
</div>
</div>

</div> <!-- content -->

</div> <!-- container -->

</body>
</html>


